home *** CD-ROM | disk | FTP | other *** search
- class StraightEnemy extends Enemy
- {
- var mc;
- var weaponType;
- static var SCORE = 200;
- static var SPEED = 5;
- static var WAIT_TIME = 45;
- static var ENEMY_TYPE = "enemy4";
- static var MAX_HEALTH = 3;
- static var COLOR = 16226057;
- static var SHAPE_FLAG = false;
- function StraightEnemy(x, y)
- {
- super(x,y);
- }
- function getScore()
- {
- return StraightEnemy.SCORE;
- }
- function getSpeed()
- {
- return StraightEnemy.SPEED;
- }
- function getEnemyType()
- {
- return StraightEnemy.ENEMY_TYPE;
- }
- function getWaitTime()
- {
- return StraightEnemy.WAIT_TIME;
- }
- function getMaxHealth()
- {
- return StraightEnemy.MAX_HEALTH;
- }
- function getColor()
- {
- return StraightEnemy.COLOR;
- }
- function getShapeFlag()
- {
- return StraightEnemy.SHAPE_FLAG;
- }
- function getWeaponsPoints()
- {
- var _loc3_ = new Array();
- var _loc2_ = new flash.geom.Point(this.mc.weapon1._x,this.mc.weapon1._y);
- this.mc.localToGlobal(_loc2_);
- _loc3_.push(_loc2_);
- _loc2_ = new flash.geom.Point(this.mc.weapon2._x,this.mc.weapon2._y);
- this.mc.localToGlobal(_loc2_);
- _loc3_.push(_loc2_);
- return _loc3_;
- }
- function shootIfAble()
- {
- this.weaponType = Math.random();
- super.shootIfAble();
- }
- function createNewMissile(x, y)
- {
- if(this.weaponType < 0.7)
- {
- new StraightMissile(x,y,this.mc._rotation);
- }
- else
- {
- new Missile(x,y,this.mc._rotation);
- }
- }
- }
-